If you want to start using clip2gif right now, read just this paragraph! You can open the Apple menu and choose About clip2gif to have a first image to play with, and you can open the Help menu (? at the left of the menu bar) and choose clip2gif Guide to have comprehensive online help.
clip2gif is a utility program for converting PICT, GIF, TIFF and JPEG images to any of these formats. It can also display and print them.
The input can be one of the following:
-PICT, GIF, TIFF or JPEG file
-PICT clipboard
-PICT AE object (with scripting)
-screen (with scripting)
The output can be one of the following:
-PICT, GIF, TIFF or JPEG file
-PICT in an AppleEvent reply (with scripting)
-PICT, GIF, TIFF or JPEG in an AppleEvent reply as a string (with scripting)
Options include output size, pixel depth, interlacing, transparency, dithering, gray shades only, JPEG compression quality; and, via AppleEvents, drawing of simple graphic elements.
If that doesn't make sense for you (maybe it does only for me), let's say clip2gif is a powerful graphic converter.
clip2gif has been written to allow the dynamic creation of pictures for the Web; it's one of the few graphic utilities that (a) are scriptable and (b) write gifs. Version 0.7.1 does much more than that. But if it doesn't do exactly what you would expect from a high-end image viewer, keep in mind that its principal goal is (scriptable) image conversion and scriptable image creation.
clip2gif can be found on many ftp archives, including info-mac (in gst/grf), Umich (in graphics/graphicsutil) and their mirrors, under the name "clip2gif", "cliptogif" or even "clip-to-gif".
Warning: If clip2gif refuses to open gif, tiff or jpeg files, you should rebuild the Finder desktop database. Be sure to remove all the previous versions of clip2gif you might have. Then, hold down both the Option (alt) and Command (Apple) keys and restart your Mac. Wait until the Finder asks you whether you want to rebuild the desktop before releasing the keys. Note that you will loose any comments you have in the "Get Info" windows of the Finder.
Usage
To make the use of clip2gif as simple as possible even for users who aren't experts in image formats, two sets of menus are available. You can switch between them with the "Expert Mode" item in the Options menu. Note that some options (JPEG quality, advanced transparency options and some of the scales) are not available in the simplified menus. On the other hand, if you are a power user, you might want to use the shortcuts described in clip2gif Shortcuts in the Help menu (╥?╙ at the right of the menu bar, available with System 7.5 and later).
a) Viewing images
Launch clip2gif and use ╥Open...╙. You can also drag file(s) onto clip2gif's icon if there is a bullet to the right of ╥Open╙ in the File menu. To view the clipboard, use ╥Open Clipboard╙. Note that this is a static window; copying something else to the clipboard won't change its content.
b) Manual conversion of a file
Launch clip2gif, set the output file format and other options, and use ╥Convert File...╙. The name of the converted file has an extension corresponding to its type (.pict, .gif, .tiff or .jpeg). If necessary, an underscore is prepended to the extension to avoid the file from being overwritten (e.g. foo.gif -> foo_.gif), unless the corresponding option is unchecked in the Preferences dialog. Other options available there include 3-characters suffix (.pct, .gif, .tif or .jpg) and uppercase suffix (.PICT, etc.)
c) Batch conversion of files
Be sure that the output file format and other options are set to the desired values and that there is a bullet to the right of ╥Convert File╙ in the ╥File╙ menu (either by launching clip2gif and setting them, or by having ╥Save[d] Options╙ in a previous session). To set ╥Convert File╙ as the default action, hold down the Control key and select it (or use ╥Preferences╙ in the ╥Options╙ menu). Then drag all the files onto the clip2gif icon.
Tip: to avoid having unwanted underscores (_) in the names of the converted files, uncheck ╥Always rename converted files╙ in the Preference dialog box, copy the files you want to convert in a new folder if you want to keep the originals, and batch-convert them. The files will be overwritten.
d) Manual conversion of the clipboard
Copy a PICT image in any application, launch clip2gif, set the output file format and other options and use ╥Save Clipboard As...╙. Finder icons can easily be converted: select the file in the Finder, choose ╥Get Info╙ in the ╥File╙ menu, select the icon and copy it.
e) Making a specific color of a GIF file transparent
Launch clip2gif, open the file, set the output type to GIF, press on shift and pick the transparent color directly in the image. Use "Save As..." to save the image.
f) Scaling saved images
There are two ways for scaling the image. First, you can specify a percentage of the original image. Second (with the Expert Mode on), you can specify the bounding box of the saved image. At least one of the dimensions of the result will have the specified size, and the other dimension will be equal or smaller.
g) Printing images
You can print either the content of a window from clip2gif, or a clip2gif file from the Finder. Printing options, as set in Page Setup and in the Print dialog, can be saved in clip2gif Preferences file by choosing Save Options in the Options menu.
h) Scripting
clip2gif conversion commands are fully scriptable and recordable. You can open clip2gif's dictionary in the Script Editor. To have a glimpse at its capabilities, switch on the record mode of the Script Editor and select "About clip2gif" in the Apple menu; the result is produced by a single Apple Event. Cf. the file "More documentation" and the content of the folder "Scripting clip2gif" for more details.
Note
SimpleText ╥copy╙ has a bug. If the result you get has a noisy background, check whether the clipboard itself is corrupted by "Show[ing] Clipboard" in the Finder. clip2gif cannot change the background back to white!
Image Format
Image formats can be classified in two groups: raster images (arrays of small rectangular patches of color called pixels), and vector images, made of a list of graphic primitives like lines and characters. Raster images can be subdivided into continuous-tone images (RGB color or grayscale) and palette images, where the colors available are a subset of the entire color space.
The PICT format is used mostly on the Macintosh. PICT images can include any QuickDraw graphic element, like lines, characters, and raster images. PICT images created by clip2gif are not compressed by QuickTime.
The GIF format (Graphics Interchange Format), developed by CompuServe Incorporated, contains one or several raster images. Image data is compressed with the LZW compression method. clip2gif can read the first image of any GIF file; it creates GIFs with one image, a depth of 1, 2, 4 or 8 bits per pixel, optional interlacing and transparency, and a fixed small comment, with the GIF version GIF89a.
The TIFF format (Tag Image File Format) can contain virtually anything. Baseline TIFF is a subset of the standard; it can represent bilevel images (black and white), grayscale images and palette-color images with 4 or 8 bits per pixel, and RGB color images with 3x8 bits per pixel. clip2gif reads and writes all baseline TIFF files, except CCITT Modified Huffman Compression.
The JPEG format (Joint Photographic Experts Group) is a lossy compressed raster format very efficient for photographic images. "Lossy" means that some information is lost when the image is compressed. You can choose the quality of the compressed image: higher quality implies a larger compressed image but less artifacts when the image is uncompressed, so there is a compromise to make.
Requirements
clip2gif needs System 7 or above and 32-bit Color Quickdraw. QuickTime is needed for JPEG conversion. AppleScript is obviously needed to Apple-script clip2gif. Both input and scaled output images must fit in RAM; set the application memory partition appropriately (Get Info in the Finder). clip2gif shouldn't crash in low memory conditions; but if it does, try to increase the memory partition to some high value (if you can) before sending me a bug report.
Small Print
This document is Copyright 1995-1996, Yves Piguet. All rights reserved.
The author makes no warranty with respect to this document, its quality, accuracy, or fitness for a particular purpose. As a result, this document is provided "as is", and the user is assuming the entire risk as to its quality and accuracy.